<template>
  <div class="">
    <div class="col-md-6 contact">
      <form role="form">
        <!-- Name -->
        <div class="row">
          <div class="col-md-6">
            <!-- E-Mail -->
            <div class="form-group">
              <input
                type="text"
                class="form-control"
                placeholder="Your name"
                id="myText"
              />
            </div>
          </div>
          <div class="col-md-6">
            <!-- Phone Number -->
            <div class="form-group">
              <input
                type="email"
                class="form-control"
                placeholder="Email address"
                id="myText1"
              />
            </div>
          </div>
        </div>
        <!-- Message Area -->
        <div class="form-group">
          <textarea
            class="form-control"
            placeholder="Write you message here..."
            style="height: 232px"
            id="myText2"
          ></textarea>
        </div>
        <!-- Subtmit Button -->
        <button type="submit" class="btn btn-send" @click="sendMail">
          Send message
        </button>
      </form>
    </div>
  </div>
</template>

<script>
export default {
  props: {},
  components: {},
  data() {
    return {};
  },
  created() {
    this.initDataFun(); // 初始化数据
  },
  mounted() {},
  beforeDestroy() {},
  computed: {},
  watch: {},
  methods: {
    // 初始化数据
    initDataFun() {},
    sendMail() {
      let link = `mailto:${
        document.getElementById("myText1").value
      }?subject=${encodeURIComponent(
        document.getElementById("myText").value
      )}&body${encodeURIComponent(document.getElementById("myText2").value)}`;
      window.location.href = link;
    },
  },
};
</script>

<style lang="less"></style>

<style lang="less" scoped></style>
